﻿using Abp.Runtime.Validation;
using Camc.Quality.Dto;
using System;
using System.Collections.Generic;
using System.Text;

namespace Camc.Quality.ProductionControl
{
    public class ManHourInput : PagedAndSortedInputDto, IShouldNormalize
    {

        /// <summary>
        /// 规格型号
        /// </summary>
        public string Model { get; set; }
        /// <summary>
        /// 发次
        /// </summary>
        public string LotNo { get; set; }

        /// <summary>
        /// 型号Id
        /// </summary>
        public Guid? ModelId { get; set; }
        /// <summary>
        /// 发次Id
        /// </summary>
        public Guid? LotNoId { get; set; }
        /// <summary>
        /// 人员集合
        /// </summary>
        public List<long> UserIdList { get; set; }
        /// <summary>
        /// 班组集合
        /// </summary>
        public List<long> OrganizationUnitIdList { get; set; }

        /// <summary>
        /// 报工开始时间
        /// </summary>
        public DateTime? StartTime { get; set; }
        /// <summary>
        /// 报工完成时间
        /// </summary>
        public DateTime? EndTime { get; set; }
        public void Normalize()
        {
            if (string.IsNullOrEmpty(Sorting))
            {
                Sorting = "CreationTime Desc";
            }
        }
    }
}
